package com.syh.jn.scm.infrastructure.repository.model.base;

import com.syh.core.ddd.infrastructure.repository.model.SuperBusinessModel;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 销售代表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Table(name = "T_BASE_SALESMAN")
@EqualsAndHashCode(callSuper = true)
public class SalesmanModel extends SuperBusinessModel {
  /**
   * 姓名
   */
  @Column(name = "NAME", columnDefinition = "varchar(50) COMMENT '姓名'")
  private String name;
  /**
   * 编号
   */
  @Column(name = "CODE", columnDefinition = "varchar(50) COMMENT '职员编号'")
  private String code;
  /**
   * 邮箱
   */
  @Column(name = "EMAIL", columnDefinition = "varchar(50) COMMENT '邮箱'")
  private String email;
  /**
   * 联系人电话
   */
  @Column(name = "MOBILE", columnDefinition = "varchar(50) COMMENT '联系人电话'", length = 50)
  private String mobile;
  /**
   * 状态: -1离职, 1在职
   */
  @Column(name = "STATUS", columnDefinition = "smallint COMMENT '状态: -1离职, 1在职'")
  private Short status;
  /**
   * 对应团队id
   */
  @Column(name = "SALES_TEAM_ID", columnDefinition = "bigint COMMENT '对应团队id'")
  private Long salesTeamId;
}

